<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>

<%
	String path = request.getContextPath();
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>保管柜信息管理</title>
<link rel="stylesheet" href="<%=path%>/easyui/themes/default/easyui.css"
	type="text/css" media="screen" />
<link rel="stylesheet" href="<%=path%>/easyui/themes/icon.css"
	type="text/css" media="screen" />
<link rel="stylesheet" href="<%=path%>/css/main.css" type="text/css"
	media="screen" />
<link rel="stylesheet" type="text/css" href="<%=path%>/css/Tooltip.css" />
<script src="<%=path%>/easyui/jquery-1.4.4.min.js"></script>
<script src="<%=path%>/easyui/jquery.easyui.min.js"></script>
<!-- mytab -->
<script src="<%=path%>/myjs/myTab.js"></script>
<!-- sys -->
<script src="<%=path%>/myjs/sys.js"></script>
<script src="<%=path%>/myjs/caseShelfManager.js"></script>
<script src="<%=path%>/easyui/easyMask.js"></script>
<script src="<%=path%>/easyui/easyUI.js"></script>
<script src="<%=path%>/easyui/easyLayer.js"></script>
<script src="<%=path%>/myjs/DatePicker/WdatePicker.js"></script>
<!-- validation -->
<!-- 
<script src="<%=path%>/validation/jquery.bgiframe.min.js"></script>
<script src="<%=path%>/validation/easy_validator.pack.js"></script>
 -->
<script>
	    var proPath = '<%=path%>';
		var greyLayer ;
		$(function(){
			grid = $('#tt').datagrid({
				url:'<%=path%>/caseShelf/getCaseShelfInfos',
			pagination : true,
			singleSelect : true,
			striped : true, //隔行换色
			rownumbers : true, //显示行号
			fit : true,//表格自动填充
			loadMsg : '正在努力为您加载，请稍作等待…',//加载信息
			toolbar : [ {
				text : '新增',
				iconCls : 'icon-add',
				handler : 'newCaseShelf'
			}, '-', {
				text : '修改',
				iconCls : 'icon-edit',
				handler : 'editCaseShelf'
			}, '-', {
				text : '删除',
				iconCls : 'icon-remove',
				handler : 'delCaseShelf'
			}, '-', {
				text : '切换使用状态',
				iconCls : 'icon-undo',
				handler : 'chgStatus'
			}, '-', {
				text : '查看格子使用情况',
				iconCls : 'icon-undo',
				handler : 'viewGridUse'
			} ]
		});
		//初始化pagination工具开始
		var pagetool = $('#tt').datagrid('getPager');
		pagetool.pagination({
			beforePageText : '第',
			afterPageText : '页，共{pages}页',
			displayMsg : '显示从 {from} 到  {to} , 总记录 {total} '
		});
		//初始化pagination工具结束
		$('body').layout();
		$('#btn-save,#btn-cancel').linkbutton();
		win = $('#user-window').window({
			collapsible : false,
			minimizable : false,
			maximizable : true,
			closable : true,
			onClose : function() {
				greyLayer.close();
			},
			closed : true,
			cache : false
		});
		view_use = $('#view_use').window({
			collapsible : false,
			minimizable : false,
			maximizable : true,
			closable : true,
			onClose : function() {
				greyLayer.close();
			},
			closed : true,
			cache : false
		});
		form = win.find('form');
		greyLayer = new easyMask(null, '100%', '100%', 100, '#000', 8, true);
	});
</script>
</head>
<body>
	<div id="window-center" region="center" fit="true"
		style="padding: 5px;">
		<table id="tt">
			<thead>
				<tr>
					<th field="shelf_name" width="100%">        保管柜名称		</th>	
					<th field="shelf_begin_date" width="100%">  保管柜启用时间	</th>
					<th field="shelf_statusDesc" width="100%">      保管柜使用状态	</th>
					<th field="shelf_row" width="100%">         保管柜行				</th>
					<th field="shelf_con" width="100%">         保管柜列				</th>
					<th field="shelf_formatDesc" width="100%">      展示规则				</th>
					<th field="shelf_typeDesc" width="100%">        保管柜类型			</th>
					<th field="room_name"  width="150%">        所属保管室			</th>
					<th field="shelf_coment" width="100%">      保管柜备注信息	</th>
				</tr>
			</thead>
		</table>
	</div>
	<div id="user-window" title="保管柜信息管理窗口"
		style="width: 420px; height: 500px;">
		<div style="padding: 20px 20px 40px 40px;">

			<form method="post">
			<input type="hidden" name="shelf_format" value="240101"/>
				<table>
					<tr>
						<td>所属保管室：</td>
						<td><input name="case_room_id" class="easyui-combobox"  style="width: 200px"
							type="text" panelHeight="auto" panelWidth="200px" 
							url="<%=path%>/caseRoom/getCaseRoom"	
							valueField="room_id"  textField="room_name" ></input></td>
					</tr>
					<tr>
						<td>保管柜名称：</td>
						<td><input name="shelf_name" class="easyui-validatebox"
							type="text" required="true"></input></td>
					</tr>
					<tr>
						<td>保管柜行：</td>
						<td><input name="shelf_row" class="easyui-validatebox"
							type="text" required="true"></input></td>
					</tr>
					<tr>
						<td>保管柜列：</td>
						<td><input name="shelf_con" class="easyui-validatebox"
							type="text"></input></td>
					</tr>
					<!-- 
					<tr>
						<td>展示规则：</td>
						<td><input name="shelf_format" class="easyui-combobox"
							type="text" panelHeight="auto"
							url="<%=path%>/dicManager/getChildListByPcode?p_code=24"
							valueField="c_code" textField="c_name" ></input></td>
					</tr> -->
					<tr>
						<td>保管柜类型：</td>
						<td><input name="shelf_type" class="easyui-combobox"
							type="text" panelHeight="auto"
							url="<%=path%>/dicManager/getChildListByPcode?p_code=23"
							valueField="c_code" textField="c_name" ></input></td>
					</tr>
					<tr>
						<td>启用时间：</td>
						<td><input name="shelf_begin_date" class="easyui-validatebox"
							type="text" onClick="WdatePicker();"></input></td>
					</tr>
					<tr>
						<td>使用状态：</td>
						<td><input name="shelf_status" class="easyui-combobox"
							type="text" panelHeight="auto"
							url="<%=path%>/dicManager/getChildListByPcode?p_code=10"
							valueField="c_code" textField="c_name" ></input></td>
					</tr>
					<tr>
						<td>备注信息：</td>
						<td><textarea name="shelf_coment"
								style="height: 100px; width: 180px;" class="easyui-validatebox"></textarea>
						</td>
					</tr>
				</table>
			</form>

		</div>
		<div style="text-align: center; padding: 5px;">
			<a href="javascript:void(0)" onclick="saveCaseShelf()" id="btn-save"
				icon="icon-save">确定</a> <a href="javascript:void(0)"
				onclick="closeWindow()" id="btn-cancel" icon="icon-cancel">取消</a>
		</div>
	</div>
	
	<div id="view_use" title="保管柜使用信息" style="width: 420px; height: 500px;">
		<div style="padding: 20px 20px 40px 40px;">
		<style type="text/css">
		ul{margin-left:-20px;}
		li{list-style-type:none;}
		</style>
		
			<table  id="gridShow" border="1" cellspacing="0" cellpadding="0">
			
			</table>
		</div>
	</div>
	
</body>
</html>
